CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(GLCM)

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

FIND_PACKAGE(OpenCV REQUIRED)
LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lib)

INCLUDE_DIRECTORIES(./)
INCLUDE_DIRECTORIES(./src)

SET(LIB_GLCM_SOURCE
	./src/glcm.h
	./src/glcm.cpp)
ADD_LIBRARY(glcm SHARED ${LIB_GLCM_SOURCE})
TARGET_LINK_LIBRARIES(glcm
	${OpenCV_LIBS})

SET(LIB_GLCM glcm)
ADD_EXECUTABLE(GLCM_test ./src/main.cpp)
TARGET_LINK_LIBRARIES(GLCM_test
	${LIB_GLCM})
